package kitto;

import java.util.ArrayList;
import java.util.Iterator;

public class Student 
{
	private int _sid;
	private String _class;
	private int _classNum;
	private String _name ;
	private char _sex;
	private ArrayList<Group> groupBelonged;

	public Student(int sid,String className,int classNumber,String name,char sex){
		this._sid=sid;
		this._class=className;
		this._classNum=classNumber;
		this._name=name;
		this._sex=sex;
		groupBelonged=new ArrayList<Group>();
	}
	
	public void assignedTo(Group grp){
		groupBelonged.add(grp);
	}
	public boolean belongToGroup(Group belongedGroup){
		return groupBelonged.contains(belongedGroup);
	}
	
	public String getClassName(){
		return this._class;
	}
	
}
